//
//  ProductDetailDataTool.m
//  LoveTravel
//
//  Created by MS on 16-1-24.
//  Copyright (c) 2016年 Lemon. All rights reserved.
//

#import "ProductDetailDataTool.h"
#import "INTERFACE.h"
@implementation ProductDetailDataTool
+(void)getProductDetailDataWithId:(NSInteger)id_recomm Succuss:(void(^)(ProductDetailModel * data))succuss failure:(void (^)( NSError *error))failure
{
    
    NSString * url =ProductDetail_URL(id_recomm);
    
    [LGHttpTool GET:url parameters:nil success:^(id responseObject) {
        
        ProductDetailModel * data = [ProductDetailModel mj_objectWithKeyValues:responseObject];
        
        if (succuss) {
            succuss(data);
        }
        
    } failure:^(NSError *error) {
        if (failure) {
            failure(error);
        }
    }];
}

+(void)getProductDetail_CommentDataWithId:(NSInteger)id_recomm Succuss:(void(^)(Product_CommentModel * data))succuss failure:(void (^)( NSError *error))failure
{
    NSString * url = ProductDetail_Comment_URL(id_recomm);
    
    [LGHttpTool GET:url parameters:nil success:^(id responseObject) {
        
        Product_CommentModel * data = [Product_CommentModel mj_objectWithKeyValues:responseObject];
        
        if (succuss) {
            succuss(data);
        }
        
    } failure:^(NSError *error) {
        if (failure) {
            failure(error);
        }
    }];
}
@end
